<!DOCTYPE html>
<html>
<head>
    <title>菜单列表</title>
    <#include "../resource.ftl"/>
    <script type="text/javascript" src="/modules/menu/js/list.js"></script>
</head>
<body>
<form class="layui-form " action="">
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div cyType="selectTool" cyProps="codeName:'menuType',search:'true'" name="type" value="" lay-verify=""
             class="layui-input-inline"></div>
        <label class="layui-form-label">菜单名称:</label>
        <div class="layui-input-inline">
            <input type="text" name="name" placeholder="请输入菜单名称" class="layui-input">
        </div>
        <label class="layui-form-label">上级菜单:</label>
        <div class="layui-input-inline">
            <input value="" id="parent" cyType="treeTool" cyProps="url:'/sys/menu/select',name:'parentId'"
                   placeholder="请选择上级菜单" class="layui-input"/>
        </div>
        <div class="layui-input-inline search-btn-group">
            <button class="layui-btn search-btn" table-id="sysMenuTable" lay-submit="" lay-filter="search">
                <i class="fa fa-search">&nbsp;</i>查询
            </button>
            <button type="reset"  class="layui-btn layui-btn-primary"><i class="fa fa-refresh">&nbsp;</i>重置</button>
        </div>
    </div>
</form>
<div class="layui-btn-group">
    <button class="layui-btn" onclick="addPage('/sys/menu/add')">
        <i class="fa fa-plus">&nbsp;</i>增加
    </button>
</div>
<div class="layui-form ">
    <table class="layui-table" lay-data="{height:500, url:'/sys/menu/listData/', page:true, id:'sysMenuTable'}" lay-filter="sysMenuTable">
        <thead>
        <tr>
            <!--复选框-->
            <th  lay-data="{type:'checkbox'}"></th>
            <th  lay-data="{field:'name'}">菜单名称</th>
            <th  lay-data="{field:'parentName'}">上级菜单</th>
            <th  lay-data="{field:'icon',render:'Custom.icon'}">菜单图标</th>
            <th  lay-data="{field:'url'}">菜单URL</th>
            <th  lay-data="{field:'perms'}">授权标识</th>
            <th  lay-data="{field:'type',render:'Custom.type'}">类型</th>
            <th  lay-data="{fixed: 'right', width:179, align:'center',render:'Custom.bar'}">操作列</th>
        </tr>
        </thead>
    </table>
</div>
<script>
    $(document).ready(function () {
        layui.use('table', function () {
            var table = layui.table;
            //转换静态表格
            table.init('sysMenuTable');
        });
    });
</script>
</body>
</html>